suppress listing of integrity algorithm if it is undefined
authorAndreas Steffen <andreas.steffen@strongswan.org>
Sat, 17 May 2008 21:52:58 +0000 (21:52 -0000)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Sat, 17 May 2008 21:52:58 +0000 (21:52 -0000)
src/charon/plugins/sql/sql_attribute.c
src/charon/plugins/stroke/stroke_list.c

index c5a9e05..45c0750 100644 (file)
@@ -112,7 +112,7 @@ static host_t* get_lease(private_sql_attribute_t *this,
                        {
                                ip = ip_from_chunk(address);
                                DBG1(DBG_CFG, "reassigning address from valid lease "
-                                        "from pool %s", name);
+                                        "from pool '%s'", name);
                        }
                }
                e->destroy(e);
@@ -206,12 +206,12 @@ static host_t* create_lease(private_sql_attribute_t *this,
                                                                  "UPDATE pools SET next = ? WHERE id = ?",
                                                                  DB_BLOB, address, DB_UINT, pool);
                                DBG1(DBG_CFG, "assigning lease with new address "
-                                        "from pool %s", name);
+                                        "from pool '%s'", name);
                        }
                        else
                        {
                                DBG1(DBG_CFG, "reassigning address from expired lease "
-                                        "from pool %s", name);
+                                        "from pool '%s'", name);
                        }
                }
        }
index e5c61f9..7fde861 100644 (file)
@@ -125,13 +125,19 @@ static void log_child_sa(FILE *out, child_sa_t *child_sa, bool all)
                                {
                                        fprintf(out, "-%d", encr_len);
                                }
-                               fprintf(out, "/");
+                               if (int_alg != AUTH_UNDEFINED)
+                               {
+                                       fprintf(out, "/");
+                               }
                        }
                        
-                       fprintf(out, "%N", integrity_algorithm_names, int_alg);
-                       if (int_len)
+                       if (int_alg != AUTH_UNDEFINED)
                        {
-                               fprintf(out, "-%d", int_len);
+                               fprintf(out, "%N", integrity_algorithm_names, int_alg);
+                               if (int_len)
+                               {
+                                       fprintf(out, "-%d", int_len);
+                               }
                        }
                        fprintf(out, ", rekeying ");