You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kg...@apache.org on 2013/06/11 20:27:02 UTC

svn commit: r1491892 - in /qpid/proton/trunk/examples/messenger/c: recv.c send.c

Author: kgiusti
Date: Tue Jun 11 18:27:01 2013
New Revision: 1491892

URL: http://svn.apache.org/r1491892
Log:
NO-JIRA: fix options handling in messenger examples

Modified:
    qpid/proton/trunk/examples/messenger/c/recv.c
    qpid/proton/trunk/examples/messenger/c/send.c

Modified: qpid/proton/trunk/examples/messenger/c/recv.c
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/examples/messenger/c/recv.c?rev=1491892&r1=1491891&r2=1491892&view=diff
==============================================================================
--- qpid/proton/trunk/examples/messenger/c/recv.c (original)
+++ qpid/proton/trunk/examples/messenger/c/recv.c Tue Jun 11 18:27:01 2013
@@ -96,9 +96,9 @@ int main(int argc, char** argv)
     }
   }
 
-  if((argc - optind) > 0)
+  if (optind < argc)
   {
-    address = argv[argc - optind];
+    address = argv[optind];
   }
 
   pn_message_t * message;

Modified: qpid/proton/trunk/examples/messenger/c/send.c
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/examples/messenger/c/send.c?rev=1491892&r1=1491891&r2=1491892&view=diff
==============================================================================
--- qpid/proton/trunk/examples/messenger/c/send.c (original)
+++ qpid/proton/trunk/examples/messenger/c/send.c Tue Jun 11 18:27:01 2013
@@ -86,7 +86,7 @@ int main(int argc, char** argv)
     }
   }
 
-  if((argc - optind) > 0) msgtext = argv[argc - optind];
+  if (optind < argc) msgtext = argv[optind];
 
   pn_message_t * message;
   pn_messenger_t * messenger;



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org