gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r18977 - libmwmodem/src/main


From: gnunet
Subject: [GNUnet-SVN] r18977 - libmwmodem/src/main
Date: Wed, 4 Jan 2012 12:23:18 +0100

Author: ruppa
Date: 2012-01-04 12:23:18 +0100 (Wed, 04 Jan 2012)
New Revision: 18977

Modified:
   libmwmodem/src/main/libmwmodem.c
Log:


Modified: libmwmodem/src/main/libmwmodem.c
===================================================================
--- libmwmodem/src/main/libmwmodem.c    2012-01-04 11:18:25 UTC (rev 18976)
+++ libmwmodem/src/main/libmwmodem.c    2012-01-04 11:23:18 UTC (rev 18977)
@@ -233,8 +233,7 @@
                        package.symbolrate = ntohl(hdr->symbolrate);
                        package.num_channels = (uint8_t) hdr->channelmax;
 
-                       struct MWMODEM_Channel *list;
-                       list = malloc(24);
+                       struct MWMODEM_Channel list[package.num_channels];
 
                        unsigned int i, currentBufferZelle;
                        currentBufferZelle = 13;
@@ -252,7 +251,7 @@
 
                                if(chl->index==i)
                                {
-                                       printf("%d\n", chl->modcod);
+
                                        if((chl->modcod>MWMODEM_MOD_DUMMY && 
chl->modcod<MWMODEM_MOD_RESERVED))
                                        {
                                                channel.modcode =  chl->modcod;
@@ -260,31 +259,27 @@
                                        else
                                        {
                                                fprintf(stderr, "Error no 
correct satellite modcode!\n");
-                                               free(list);
                                                return;
                                        }
-                                       printf("%d\n", channel.modcode);
 
                                        channel.queue = (uint8_t) chl->queue;
 
                                        if (channel.queue> 64 || channel.queue 
<0)
                                        {
                                                fprintf(stderr, "Error Frames 
out of borders!");
-                                               free(list);
                                                return;
                                        }
-                                       //printf("%d\n", ntohl(chl2->datasent));
+
                                        channel.datasent = 
ntohl(chl2->datasent);
 
                                        channel.symbolratelimit = 
ntohl(chl2->symbolratelimit);
 
                                        list[i] = channel;
                                        printf("%d\n", list[0].modcode);
-                                       currentBufferZelle+=11;
+                                       currentBufferZelle+=8;
                                }
                        }
-                       package.channel = (const struct MWMODEM_Channel *) list;
-                       free(list); printf("%d\n", package.channel[0].modcode);
+                       package.channel =(const struct MWMODEM_Channel *) list;
                }
 
        fc->cb(fc->cls, &package);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]