Stop the transmission first and then close the bundles.
Please look at the 'handleBundleConnection' method in the 'BndlManage.cpp' file. Here are the code that used to decided if the Bundle is a valid configuration Here are the code that we used in our application to decide if it is a valid configuration. If you don’t have it, you can add to your code.
************************************************************ if (bndlCfg.bndl.cfgBundle.common.gen.bundle_type == TDMOIPCNTR_CES_E) { tmp1 = 0; for (i = 1; i < 32; i++) { if (bndlCfg.bndl.cfgBundle.tsa.ts_status[i].assigned)// Is the timeslot assigned? tmp1++; } tmp1 = tmp1 * bndlCfg.bndl.cfgBundle.type.ces.gen.num_of_frames_in_pack; if (tmp1 > 1948) { printf("\n\nPayload size is too big. The maxmium size is 1948 bytes."); printf("\nPlease decrease the Timeslot Assignment or the Number of Frames\n"); return FALSE; } }