~ubuntu-branches/ubuntu/oneiric/samba/oneiric-security

« back to all changes in this revision

Viewing changes to source/smbd/process.c

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-07-21 17:53:23 UTC
  • mfrom: (0.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050721175323-m3oh6aoigywohfnq
Tags: 3.0.14a-6ubuntu1
Resynchronise with Debian, resolving merge conflicts (#12360)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1177
1177
        int outsize2;
1178
1178
        char inbuf_saved[smb_wct];
1179
1179
        char outbuf_saved[smb_wct];
1180
 
        int wct = CVAL(outbuf,smb_wct);
1181
 
        int outsize = smb_size + 2*wct + SVAL(outbuf,smb_vwv0+2*wct);
 
1180
        int outsize = smb_len(outbuf) + 4;
1182
1181
 
1183
1182
        /* maybe its not chained */
1184
1183
        if (smb_com2 == 0xFF) {
1283
1282
void check_reload(int t)
1284
1283
{
1285
1284
        static time_t last_smb_conf_reload_time = 0;
1286
 
        static time_t last_load_printers_reload_time = 0;
 
1285
        static time_t last_printer_reload_time = 0;
1287
1286
        time_t printcap_cache_time = (time_t)lp_printcap_cache_time();
1288
1287
 
1289
1288
        if(last_smb_conf_reload_time == 0) {
1292
1291
                   Then no printer is available till the first printers check
1293
1292
                   is performed.  A lower initial interval circumvents this. */
1294
1293
                if ( printcap_cache_time > 60 )
1295
 
                        last_load_printers_reload_time = t - printcap_cache_time + 60;
 
1294
                        last_printer_reload_time = t - printcap_cache_time + 60;
1296
1295
                else
1297
 
                        last_load_printers_reload_time = t;
 
1296
                        last_printer_reload_time = t;
1298
1297
        }
1299
1298
 
1300
1299
        if (reload_after_sighup || (t >= last_smb_conf_reload_time+SMBD_RELOAD_CHECK)) {
1309
1308
        { 
1310
1309
                /* see if it's time to reload or if the clock has been set back */
1311
1310
                
1312
 
                if ( (t >= last_load_printers_reload_time+printcap_cache_time) 
1313
 
                        || (t-last_load_printers_reload_time  < 0) ) 
 
1311
                if ( (t >= last_printer_reload_time+printcap_cache_time) 
 
1312
                        || (t-last_printer_reload_time  < 0) ) 
1314
1313
                {
1315
1314
                        DEBUG( 3,( "Printcap cache time expired.\n"));
1316
 
                        remove_stale_printers();
1317
 
                        load_printers();
1318
 
                        last_load_printers_reload_time = t;
 
1315
                        reload_printers();
 
1316
                        last_printer_reload_time = t;
1319
1317
                }
1320
1318
        }
1321
1319
}