Commit 4b0cb109 authored by Matteo Quintiliani's avatar Matteo Quintiliani
Browse files

set MAX_LEN_S_CHANNELS to 4096


git-svn-id: file:///home/quintiliani/svncopy/nmxptool/trunk@1047 3cd66e75-5955-46cb-a940-c26e5fc5497d
parent 61cf4d1b
......@@ -7,7 +7,7 @@
* Istituto Nazionale di Geofisica e Vulcanologia - Italy
* quintiliani@ingv.it
*
* $Id: nmxp.c,v 1.86 2008-04-05 14:08:00 mtheo Exp $
* $Id: nmxp.c,v 1.87 2008-04-08 07:57:23 mtheo Exp $
*
*/
......@@ -116,12 +116,13 @@ int nmxp_sendAddTimeSeriesChannel_raw(int isock, NMXP_CHAN_LIST_NET *channelList
return ret;
}
#define MAX_LEN_S_CHANNELS 4096
int nmxp_sendAddTimeSeriesChannel(int isock, NMXP_CHAN_LIST_NET *channelList, int32_t shortTermCompletion, int32_t out_format, NMXP_BUFFER_FLAG buffer_flag, int n_channel, int n_usec, int flag_restart) {
static int i = 0;
static int first_time = 1;
static struct timeval last_tp_now;
char s_channels[1024];
char s_channels[MAX_LEN_S_CHANNELS];
int j;
int ret = 0;
NMXP_CHAN_LIST_NET split_channelList;
......@@ -183,11 +184,11 @@ int nmxp_sendAddTimeSeriesChannel(int isock, NMXP_CHAN_LIST_NET *channelList, in
i++;
}
if(split_channelList.number > 0) {
snprintf(s_channels, 1024, "%.0f/%d chan %d of %d:",
snprintf(s_channels, MAX_LEN_S_CHANNELS, "%.0f/%d chan %d of %d:",
(double)diff_usec/1000.0, split_channelList.number, i, channelList->number);
for(j=0; j < split_channelList.number; j++) {
strncat(s_channels," ", 1024);
strncat(s_channels, NMXP_LOG_STR(split_channelList.channel[j].name), 1024);
strncat(s_channels, " ", MAX_LEN_S_CHANNELS);
strncat(s_channels, NMXP_LOG_STR(split_channelList.channel[j].name), MAX_LEN_S_CHANNELS);
}
nmxp_log(NMXP_LOG_NORM, NMXP_LOG_D_CONNFLOW, "%s\n", s_channels);
ret = nmxp_sendAddTimeSeriesChannel_raw(isock, &split_channelList, shortTermCompletion, out_format, buffer_flag);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment