~ubuntu-branches/ubuntu/vivid/slurm-llnl/vivid

« back to all changes in this revision

Viewing changes to src/plugins/sched/wiki2/msg.c

  • Committer: Bazaar Package Importer
  • Author(s): Gennaro Oliva
  • Date: 2009-09-24 23:28:15 UTC
  • mfrom: (1.1.11 upstream) (3.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090924232815-enh65jn32q1ebg07
Tags: 2.0.5-1
* New upstream release 
* Changed dependecy from lib-mysqlclient15 to lib-mysqlclient 
* Added Default-Start for runlevel 2 and 4 and $remote_fs requirement in
  init.d scripts (Closes: #541252)
* Postinst checks for wrong runlevels 2 and 4 links
* Upgraded to standard version 3.8.3
* Add lintian overrides for missing slurm-llnl-configurator.html in doc
  base registration
* modified postrm scripts to ignore pkill return value in order to avoid
  postrm failure when no slurm process is running
* Checking for slurmctld.pid before cancelling running and pending
  jobs during package removal 

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 *  msg.c - Message/communcation manager for Wiki plugin
3
3
 *****************************************************************************
4
4
 *  Copyright (C) 2006-2007 The Regents of the University of California.
 
5
 *  Copyright (C) 2008-2009 Lawrence Livermore National Security.
5
6
 *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
6
7
 *  Written by Morris Jette <jette1@llnl.gov>
7
 
 *  LLNL-CODE-402394.
 
8
 *  CODE-OCEC-09-009. All rights reserved.
8
9
 *  
9
10
 *  This file is part of SLURM, a resource management program.
10
 
 *  For details, see <http://www.llnl.gov/linux/slurm/>.
 
11
 *  For details, see <https://computing.llnl.gov/linux/slurm/>.
 
12
 *  Please also read the included file: DISCLAIMER.
11
13
 *  
12
14
 *  SLURM is free software; you can redistribute it and/or modify it under
13
15
 *  the terms of the GNU General Public License as published by the Free
35
37
 *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA.
36
38
\*****************************************************************************/
37
39
 
38
 
#include "./crypto.h"
39
 
#include "./msg.h"
40
 
#include "src/common/uid.h"
41
 
#include "src/slurmctld/locks.h"
 
40
#include "slurm/slurm.h"
 
41
#include <src/common/uid.h>
 
42
#include <src/slurmctld/locks.h>
 
43
#include <src/plugins/sched/wiki2/crypto.h>
 
44
#include <src/plugins/sched/wiki2/msg.h>
42
45
#include <sys/poll.h>
43
46
 
44
47
#define _DEBUG 0
529
532
                return NULL;
530
533
        }
531
534
 
532
 
        debug2("wiki msg recv:%s", buf);
 
535
        if (slurm_get_debug_flags() && DEBUG_FLAG_WIKI)
 
536
                info("wiki msg recv:%s", buf);
 
537
        else
 
538
                debug2("wiki msg recv:%s", buf);
 
539
 
533
540
        return buf;
534
541
}
535
542
 
543
550
        char header[10];
544
551
        size_t data_sent;
545
552
 
546
 
        debug2("wiki msg send:%s", buf);
 
553
        if (slurm_get_debug_flags() && DEBUG_FLAG_WIKI)
 
554
                info("wiki msg send:%s", buf);
 
555
        else
 
556
                debug2("wiki msg send:%s", buf);
547
557
 
548
558
        (void) sprintf(header, "%08lu\n", (unsigned long) size);
549
559
        if (_write_bytes((int) new_fd, header, 9) != 9) {