summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4485c82)
raw | patch | inline | side by side (parent: 4485c82)
author | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 16 Apr 2008 15:36:51 +0000 (15:36 +0000) | ||
committer | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 16 Apr 2008 15:36:51 +0000 (15:36 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10516 594d385d-05f5-0310-b6e9-bd551577e9d8
index 3dd3882ec020212e8c6f4b2132be145fb0eab888..a629320a15f7e412eb5ef911657f35b49659525a 100644 (file)
}
my $primkeys = $arg->{'primkey'};
my $prim_statement="";
- if( 0 != @$primkeys ) {
+ if( 0 != @$primkeys ) { # more than one primkey exist in list
my @prim_list;
foreach my $primkey (@$primkeys) {
if($primkey eq 'id') {
my $sql_statement = "SELECT * FROM $table $prim_statement";
my $res = @{ $self->{dbh}->selectall_arrayref($sql_statement) };
- if ($res == 0) {
- # primekey is unique
+ # primekey is unique
+ if ($res == 0) {
# fetch column names of table
my $col_names = &get_table_columns($self, $table);
return (4, $sql_statement);
}
+ # entry already exists, so update it
} else {
- # entry already exists, so update it
my @update_l;
while( my ($pram, $val) = each %{$arg} ) {
if( $pram eq 'table' ) { next; }
my $sql_statement= "UPDATE $table $update_str $prim_statement";
my $db_res = &update_dbentry($self, $sql_statement );
-
}
return 0;
index b14caeafb460cc8a1619d6ae4845359c41066176..02f407b708380b86887a6cf6b1321f360ae0f32f 100644 (file)
&main::daemon_log("Host was not found in LDAP!", 1);
# set status = hardware_detection at jobqueue if entry exists
+# TODO
+ # resolve plain name for host
my $func_dic = {table=>$main::job_queue_tn,
primkey=>['id'],
timestamp=>&get_time,
index a6fad7e3dd9f17268a07ebb7d4cd69a2803a70ff..c65c6f07ad1d6de5b9053a93f5e1ccc1bf8c1313 100644 (file)
}
}
- # in case of no and more than one running jobs in queue, add on single job
+ # in case of no and more than one running jobs in queue, add one single job
+
+# TODO
+ # resolve plain name for host $macaddress
&main::daemon_log("$session_id DEBUG: add job to queue for host '$macaddress'", 7);
my $func_dic = {table=>$main::job_queue_tn,
primkey=>['id'],
targettag=>$source,
xmlmessage=>'none',
macaddress=>$macaddress,
- plain_name=>'none',
+ plainname=>'none',
};
my ($err, $error_str) = $main::job_db->add_dbentry($func_dic);
if ($err != 0) {
index 6b9e6c2dbd0f3e4e05c1a8f47745b21061b09ac5..0efe9eab92a8b0cd9779c6bef175c6e4e0f4f909 100755 (executable)
my $log_file = "/home/hickert/log.gosa-si-server";
#my $log_file = "/var/log/gosa-si-server.log";
+
my $within_session = 0;
my $within_incoming = 0;
my $within_header = 0;
if ($line =~ /gosa-si-server (\d+) / ) {
if ((defined $1) && ($1 eq $session)) {
- $within_session = 1;
return $line;
- } else { $within_session = 0; }
- } else {
- if ($within_session == 1) { return $line; }
+ }
}
return;
}