~ubuntu-branches/ubuntu/trusty/postfix/trusty-updates

« back to all changes in this revision

Viewing changes to src/proxymap/proxymap.c

Tags: upstream-2.3.1
ImportĀ upstreamĀ versionĀ 2.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
238
238
    /*
239
239
     * Open one instance of a map for each combination of name+flags.
240
240
     */
241
 
    vstring_sprintf(map_type_name_flags, "%s:%o",
242
 
                    map_type_name, request_flags);
 
241
    vstring_sprintf(map_type_name_flags, "%s:%s",
 
242
                    map_type_name, dict_flags_str(request_flags));
243
243
    if ((dict = dict_handle(STR(map_type_name_flags))) == 0)
244
244
        dict = dict_open(map_type_name, READ_OPEN_FLAGS, request_flags);
245
245
    if (dict == 0)
262
262
     */
263
263
    if (attr_scan(client_stream, ATTR_FLAG_STRICT,
264
264
                  ATTR_TYPE_STR, MAIL_ATTR_TABLE, request_map,
265
 
                  ATTR_TYPE_NUM, MAIL_ATTR_FLAGS, &request_flags,
 
265
                  ATTR_TYPE_INT, MAIL_ATTR_FLAGS, &request_flags,
266
266
                  ATTR_TYPE_STR, MAIL_ATTR_KEY, request_key,
267
267
                  ATTR_TYPE_END) != 3) {
268
268
        reply_status = PROXY_STAT_BAD;
284
284
     * Respond to the client.
285
285
     */
286
286
    attr_print(client_stream, ATTR_FLAG_NONE,
287
 
               ATTR_TYPE_NUM, MAIL_ATTR_STATUS, reply_status,
 
287
               ATTR_TYPE_INT, MAIL_ATTR_STATUS, reply_status,
288
288
               ATTR_TYPE_STR, MAIL_ATTR_VALUE, reply_value,
289
289
               ATTR_TYPE_END);
290
290
}
303
303
     */
304
304
    if (attr_scan(client_stream, ATTR_FLAG_STRICT,
305
305
                  ATTR_TYPE_STR, MAIL_ATTR_TABLE, request_map,
306
 
                  ATTR_TYPE_NUM, MAIL_ATTR_FLAGS, &request_flags,
 
306
                  ATTR_TYPE_INT, MAIL_ATTR_FLAGS, &request_flags,
307
307
                  ATTR_TYPE_END) != 2) {
308
308
        reply_status = PROXY_STAT_BAD;
309
309
        reply_flags = 0;
319
319
     * Respond to the client.
320
320
     */
321
321
    attr_print(client_stream, ATTR_FLAG_NONE,
322
 
               ATTR_TYPE_NUM, MAIL_ATTR_STATUS, reply_status,
323
 
               ATTR_TYPE_NUM, MAIL_ATTR_FLAGS, reply_flags,
 
322
               ATTR_TYPE_INT, MAIL_ATTR_STATUS, reply_status,
 
323
               ATTR_TYPE_INT, MAIL_ATTR_FLAGS, reply_flags,
324
324
               ATTR_TYPE_END);
325
325
}
326
326
 
352
352
        } else {
353
353
            msg_warn("unrecognized request: \"%s\", ignored", STR(request));
354
354
            attr_print(client_stream, ATTR_FLAG_NONE,
355
 
                       ATTR_TYPE_NUM, MAIL_ATTR_STATUS, PROXY_STAT_BAD,
 
355
                       ATTR_TYPE_INT, MAIL_ATTR_STATUS, PROXY_STAT_BAD,
356
356
                       ATTR_TYPE_END);
357
357
        }
358
358
    }
404
404
            (void) htable_enter(proxy_read_maps, type_name, (char *) 0);
405
405
    }
406
406
    myfree(saved_filter);
 
407
 
 
408
    /*
 
409
     * This process is called by clients that already enforce the max_idle
 
410
     * time, so we don't have to do it another time.
 
411
     */
 
412
    var_idle_limit = 1;
407
413
}
408
414
 
409
415
/* pre_accept - see if tables have changed */