Lines Matching refs:tseg

79 	query_segment_t *tseg = NULL;
91 tseg = nseg;
97 if (tseg->sql != NULL && tseg->direct == isc_boolean_true)
98 isc_mem_free(mctx, tseg->sql);
102 isc_mem_put(mctx, tseg, sizeof(query_segment_t));
121 query_segment_t *tseg = NULL;
155 /* allocate memory for tseg */
156 tseg = isc_mem_get(mctx, sizeof(query_segment_t));
157 if (tseg == NULL) { /* no memory, clean everything up. */
161 tseg->sql = NULL;
162 tseg->direct = isc_boolean_false;
164 ISC_LINK_INIT(tseg, link);
166 ISC_LIST_APPEND(*tql, tseg, link);
172 tseg->sql = isc_mem_strdup(mctx,
175 if (tseg->sql == NULL) {
180 /* tseg->sql points directly to a string. */
181 tseg->direct = isc_boolean_true;
182 tseg->strlen = strlen(tseg->sql);
185 if (strcasecmp(tseg->sql, "zone") == 0) {
190 isc_mem_free(mctx, tseg->sql);
191 /* set tseg->sql to in-direct zone string */
192 tseg->sql = (char**) zone;
193 tseg->strlen = 0;
194 /* tseg->sql points in-directly to a string */
195 tseg->direct = isc_boolean_false;
198 } else if (strcasecmp(tseg->sql, "record") == 0) {
203 isc_mem_free(mctx, tseg->sql);
204 /* set tseg->sql to in-direct record string */
205 tseg->sql = (char**) record;
206 tseg->strlen = 0;
207 /* tseg->sql points in-directly poinsts to a string */
208 tseg->direct = isc_boolean_false;
211 } else if (strcasecmp(tseg->sql, "client") == 0) {
216 isc_mem_free(mctx, tseg->sql);
217 /* set tseg->sql to in-direct record string */
218 tseg->sql = (char**) client;
219 tseg->strlen = 0;
220 /* tseg->sql points in-directly poinsts to a string */
221 tseg->direct = isc_boolean_false;
289 query_segment_t *tseg = NULL;
297 tseg = ISC_LIST_HEAD(*querylist);
298 while (tseg != NULL) {
303 if (tseg->direct == isc_boolean_true)
304 length += tseg->strlen;
306 length += strlen(* (char**) tseg->sql);
308 tseg = ISC_LIST_NEXT(tseg, link);
319 tseg = ISC_LIST_HEAD(*querylist);
320 while (tseg != NULL) {
321 if (tseg->direct == isc_boolean_true)
323 strcat(qs, tseg->sql);
326 strcat(qs, * (char**) tseg->sql);
328 tseg = ISC_LIST_NEXT(tseg, link);