Revision fed93cda src/market/MarketPlaceManagerDriver.cc

View differences:

src/market/MarketPlaceManagerDriver.cc
163 163
            }
164 164
        }
165 165
    }
166
    MarketPlaceApp *mp_app = nullptr;
167
    std::string error;
168
    std::string source;
169
    int rc_del;
170
    market = marketpool->get(id, true);
171
    set<int> apps_mp = market->get_marketapp_ids();
172
    market->unlock();
173

  
174
    for (set<int>::iterator i = apps_mp.begin(); i != apps_mp.end(); i++) {
175
        mp_app = apppool->get(*i, true);
176
        if ( mp_app != 0 )
177
        {
178
            if(apppool->test_map_check(mp_app->get_name())){ //delete app
179
                market = marketpool->get(id, true);
180

  
181
                source = mp_app->get_source();
182
                rc_del = apppool->drop(mp_app, error);
183

  
184
                market->del_marketapp(*i);
185
                marketpool->update(market);
186

  
187
                market->unlock();
188
                if ( rc_del < 0 )
189
                {
190
                    oss << " Error removing app from DB: " << error
191
                        << ". Remove app manually, source is: " << source;
192
                }
193
            }
194
        }
195
        mp_app->unlock();
196
    }
166 197

  
167 198
    oss << "Marketplace " << name << " (" << id << ") successfully monitored.";
168 199

  

Also available in: Unified diff