change the name of the structs module_info_t
authorNicolas Cornu <nicolas.cornu@ensi-bourges.fr>
Tue, 17 Aug 2010 22:34:16 +0200
changeset 141 8bc73e965a07
parent 140 bbc50e69f5ad
child 142 f513b0bc039a
change the name of the structs module_info_t
jingle-ft/filetransfer.c
jingle-ibb/ibb.c
--- a/jingle-ft/filetransfer.c	Tue Aug 17 22:16:24 2010 +0200
+++ b/jingle-ft/filetransfer.c	Tue Aug 17 22:34:16 2010 +0200
@@ -86,7 +86,7 @@
   .info         = info
 };
 
-module_info_t info_jingle_filetransfer = {
+module_info_t info_jingle_ft = {
   .branch          = MCABBER_BRANCH,
   .api             = MCABBER_API_VERSION,
   .version         = PROJECT_VERSION,
@@ -300,7 +300,7 @@
 static int _next_index(void)
 {
   static int a = 0;
-  return a++;
+  return ++a;
 }
 
 static void do_sendfile(char *arg)
@@ -414,7 +414,8 @@
       const gchar *state = strstate[jftio->jft->state];
       const gchar *desc = jftio->jft->desc?jftio->jft->desc:"";
       const gchar *hash = "";
-      if (jftio->jft->state==JINGLE_FT_ENDING) {
+      if (jftio->jft->dir == JINGLE_FT_INCOMING &&
+          jftio->jft->state == JINGLE_FT_ENDING) {
         if (_check_hash(jftio->jft->hash,jftio->jft->md5) == FALSE)
           hash = "corrupt";
         else
--- a/jingle-ibb/ibb.c	Tue Aug 17 22:16:24 2010 +0200
+++ b/jingle-ibb/ibb.c	Tue Aug 17 22:34:16 2010 +0200
@@ -70,7 +70,7 @@
   .info      = info
 };
 
-module_info_t  info_jingle_inbandbytestream = {
+module_info_t  info_jingle_ibb = {
   .branch          = MCABBER_BRANCH,
   .api             = MCABBER_API_VERSION,
   .version         = PROJECT_VERSION,